package cn.wgx.modules.sys.entity;

import cn.wgx.modules.base.entity.BaseEntity;

import java.io.Serializable;

/**
 * Created By MBG-GUI-EXTENSION https://github.com/spawpaw/mybatis-generator-gui-extension
 * Description:
 *
 * @author
 */
public class SysChinaCity extends BaseEntity implements Serializable {

    /**
     * 区域名称
     *
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    private String cityName;

    /**
     * 父区域代码
     *
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    private Integer parentid;

    /**
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    private Integer city_id;

    /**
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    private static final long serialVersionUID = 1L;

    /**
     * 区域代码
     *
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    private Integer codeid;

    /**
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCity_id() == null) ? 0 : getCity_id().hashCode());
        result = prime * result + ((getCodeid() == null) ? 0 : getCodeid().hashCode());
        result = prime * result + ((getParentid() == null) ? 0 : getParentid().hashCode());
        result = prime * result + ((getCityName() == null) ? 0 : getCityName().hashCode());
        return result;
    }

    /**
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysChinaCity other = (SysChinaCity) that;
        return (this.getCity_id() == null ? other.getCity_id() == null : this.getCity_id().equals(other.getCity_id())) && (this.getCodeid() == null ? other.getCodeid() == null : this.getCodeid().equals(other.getCodeid())) && (this.getParentid() == null ? other.getParentid() == null : this.getParentid().equals(other.getParentid())) && (this.getCityName() == null ? other.getCityName() == null : this.getCityName().equals(other.getCityName()));
    }

    /**
     * This method returns the value of the database column cgcenter..sys_china_city.city_id
     *
     * @return the value of cgcenter..sys_china_city.city_id
     *
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    public Integer getCity_id() {
        return city_id;
    }

    /**
     * This method sets the value of the database column cgcenter..sys_china_city.city_id
     *
     * @param city_id the value for cgcenter..sys_china_city.city_id
     *
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    public void setCity_id(Integer city_id) {
        this.city_id = city_id;
    }

    /**
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", city_id=").append(city_id);
        sb.append(", codeid=").append(codeid);
        sb.append(", parentid=").append(parentid);
        sb.append(", cityName=").append(cityName);
        sb.append("]");
        return sb.toString();
    }

    /**
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    public SysChinaCity withCityName(String cityName) {
        this.setCityName(cityName);
        return this;
    }

    /**
     * This method returns the value of the database column cgcenter..sys_china_city.parentid
     *
     * @return the value of cgcenter..sys_china_city.parentid
     *
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    public Integer getParentid() {
        return parentid;
    }

    /**
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    public SysChinaCity withCodeid(Integer codeid) {
        this.setCodeid(codeid);
        return this;
    }

    /**
     * This method sets the value of the database column cgcenter..sys_china_city.codeid
     *
     * @param codeid the value for cgcenter..sys_china_city.codeid
     *
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    public void setCodeid(Integer codeid) {
        this.codeid = codeid;
    }

    /**
     * This method sets the value of the database column cgcenter..sys_china_city.cityName
     *
     * @param cityName the value for cgcenter..sys_china_city.cityName
     *
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    /**
     * This method returns the value of the database column cgcenter..sys_china_city.cityName
     *
     * @return the value of cgcenter..sys_china_city.cityName
     *
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    public String getCityName() {
        return cityName;
    }

    /**
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    public SysChinaCity withParentid(Integer parentid) {
        this.setParentid(parentid);
        return this;
    }

    /**
     * This method returns the value of the database column cgcenter..sys_china_city.codeid
     *
     * @return the value of cgcenter..sys_china_city.codeid
     *
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    public Integer getCodeid() {
        return codeid;
    }

    /**
     * This method sets the value of the database column cgcenter..sys_china_city.parentid
     *
     * @param parentid the value for cgcenter..sys_china_city.parentid
     *
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    public void setParentid(Integer parentid) {
        this.parentid = parentid;
    }

    /**
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    public SysChinaCity withCity_id(Integer city_id) {
        this.setCity_id(city_id);
        return this;
    }
}
